<?php
namespace Controller;

use HproseHttpServer;
use Service\SampleRawService;


/**
 * HproseServer
 * @author los_gsy
 */
class HproseServerController extends BaseController {
	/**
	 * 构造函数
	 */
	public function __construct() {
		parent::__construct();
	}


	/**
	 * test
	 */
	public function test() {
		$result = __METHOD__;
		echo 'result:<br />';
		var_dump($result);
		return false;
	}


	/**
	 * hproseServer
	 * Hprose不支持namespace，因此，该Server运行会失败
	 */
	public function hproseServer() {
// 		echo SampleRawService::test();
// 		echo '<br />';
		$server = new HproseHttpServer;
// 		$server->addFunction('test');
		$server->addMethod('test', 'SampleRawService');
		$server->start();
	}


}
